//
//  NotificationBC.m
//  IOSLearn
//
//  Created by Yanyan Jiang on 2019/3/2.
//  Copyright © 2019 Yanyan Jiang. All rights reserved.
//

#import "NotificationBC.h"

@interface NotificationBC ()

@end

@implementation NotificationBC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"BBBBBB";
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(bbbbb:) name:@"postCenter" object:nil];    
}

- (void)bbbbb:(NSNotification *)info{
//    NSLog(@"notificationB:%@",info.name);
//    NSLog(@"notificationB:%@",info.object);
}

- (void)dealloc {
    // 移除当前Controller中的所有观察者
    //    [[NSNotificationCenter defaultCenter] removeObserver:self];
    // 移除当前Controller中名字为postCenter的观察者
    [[NSNotificationCenter defaultCenter] removeObserver:self name:@"postCenter" object:nil];
}


@end
